
##分库分表的脚本
for year in range(1995,2021):
    print("create table if not exists house_price_{0}  like house_price;".format(year))

# 删除不用house_price表
print("drop table house_price;")

for year in range(1995,2021):
    print("alter table house_price_{0} add index transfer_date_index  using  btree(transfer_date desc);".format(year))
    print("alter table house_price_{0} add unique index uni_id(id);".format(year))